import java.util.Vector;

/**
 * Queue is generic queue data structure(FIFO).
 * @param E Specifies the data type of the elements.
 *
 * @version 1.0
 * @author K.Vamsi Krishna
 */
public class Queue<E>
{
	private Vector<E> elements = new Vector<E>(10,10);
	
	/**
	 * Inserts a new element into queue.
	 */
	public void insert(E o)
	{
		elements.add(o);
	}
	
	/**
	 * Deletes an element from the queue.
	 */
	public E delete()
	{
		E o = elements.get(0);
		
		elements.remove(0);
		
		return o;
	}
	
	/**
	 * Checks whether the queue has any elements.
	 * @return True if the queue is empty.
	 */
	public boolean isEmpty()
	{
		if(elements.size() == 0)
			return true;
		else
			return false;
	}
}